<?php
/**
 * Created by novebeta.
 * Date: 10/19/12
 * Time: 5:05 PM
 */
class BackEndController extends CController
{
    public $layout='//layouts/main';
    public $menu=array();
    public $breadcrumbs=array();
    public $layoutPosition = "left";
    public $layoutHeaderID = "headerMimin2";
    public $layoutLogo = true;
    public $sub_menu = "";

    public function filters()
    {
        return array(
            'accessControl',
        );
    }

    public function accessRules()
    {
        return array(
            array('allow',
                'users'=>array('*'),
                'actions'=>array('login'),
            ),
            array('allow',
                'users'=>array('@'),
            ),
            array('deny',
                'users'=>array('*'),
            ),
        );
    }

    public function render($view, $data = null, $return = false)
    {
        cs()->registerMetaTag("text/html; charset=ISO-8859-1",null,"Content-Type");
        cs()->registerCssFile(bu() . '/css/styleadmin.css');
        //cs()->registerCssFile(bu() . '/css/menu.css');
        //cs()->registerCssFile(bu() . '/plugins/slimbox2/slimbox2.css');
        cs()->registerCoreScript('jquery');
        //cs()->registerScriptFile(bu() . '/plugins/slimbox2/slimbox2.js');
        parent::render($view, $data, $return);
    }

}
